package utils;

import java.math.BigDecimal;
import java.util.Map;

import com.google.common.collect.Maps;


public class BizConstants {
	/**
	 * Session中的用户ID名称
	 */
	public final static String USER_SESSION_ID="USER_ID";
	/**
	 * 系统参数前缀
	 */
	public final static String SYSTEM_PARAM="System_Param";
	/**
	 * 数据上传格式
	 */
	public final static String UTF_8="utf-8";
	/**
	 * 默认表格页大小
	 */
	public final static int pagesize=15;
	/**
	 * session前缀
	 */
	public static final String SESSION_PREFIX = "Session_";
	
	public static final String CUSTOMER_SESSION_PREFIX="Customer_Session_";
	/**
	 * 缓存中保存优化状态
	 */
	public static final String MAJORKEYWORDS_STATUS = "MAJOR_STATUS";
	/**
	 * 优化临时文件
	 */
	public static final String MAJORFILE_TEMP = "public/temp/major_temp.txt";
	
	/**
	 * 启动会议端口返回值为2时表示已经初始化
	 */
	public static final String HAS_INIT="2";
	/**
	 * 语音播报音色
	 */
	public static final Map<String,String> BROADCASTTONE = Maps.newHashMapWithExpectedSize(2);
    static{
    	//'01:女声，02:男声,
    	BROADCASTTONE.put("DR_BROADCAST_TONE_02", "510D6500-B486-4767-8379-0EB59AB7AAAF");
    	//BROADCASTTONE.put("DR_BROADCAST_TONE_01", "cn_xiaokun_common");
    	BROADCASTTONE.put("DR_BROADCAST_TONE_01", "47FF1422-796F-427F-8408-EC5FD3367729");
    }
    /**
     * 语音播报语速
     */
    public static final Map<String,String> BROADCASTSPEED = Maps.newHashMapWithExpectedSize(3);
    static{
    	//'03:快速，01:中速，02:慢速',
    	BROADCASTSPEED.put("DR_BROADCAST_SPEED_03", "1");
    	BROADCASTSPEED.put("DR_BROADCAST_SPEED_01", "5");
    	BROADCASTSPEED.put("DR_BROADCAST_SPEED_02", "9");
    }
    public static final Map<String,String> COURTLIVEINTERFACE = Maps.newHashMapWithExpectedSize(3);
    static{
    	COURTLIVEINTERFACE.put("0", "成功");
    	COURTLIVEINTERFACE.put("1", "未进行初始化");
    	COURTLIVEINTERFACE.put("2", "已经初始化");
    	COURTLIVEINTERFACE.put("3", "参数错误");
    	COURTLIVEINTERFACE.put("4", "获取音频失败");
    	COURTLIVEINTERFACE.put("5", "获取缓存失败");
    	COURTLIVEINTERFACE.put("6", "语音识别失败");
    	COURTLIVEINTERFACE.put("7", "服务器正忙");
    	COURTLIVEINTERFACE.put("8", "发送失败");
    	COURTLIVEINTERFACE.put("9", "写入文件失败");
    	COURTLIVEINTERFACE.put("10", "不支持格式化");
    	COURTLIVEINTERFACE.put("11", "采样失败");
    	COURTLIVEINTERFACE.put("12", "环境异常");
    	COURTLIVEINTERFACE.put("13", "未调用结束会议，请先调用结束");
    	COURTLIVEINTERFACE.put("14", "结束会议中，请稍候~");
    }
    /**
     * 语音播报文件临时存放路径
     */
    public static final String FILE_TEMP_PATH="public/filetemp/";
    
    /**
     * Mp3文件存放路径
     */
    public static final String FILE_MP3_PATH="/public/mp3File/";
    /**
     * 最后一条的转写记录缓存后缀
     */
    public static final String CACHE_CASE_KEY="_CaseKey";
    /**
     * 最后一条记录已更新标示
     */
    public static final String CACHE_CASE_ISUPDATE="_CASEKEYUPDATE";
    /**
     * 会议状态缓存后缀
     */
    public static final String CACHE_CASE_STATUS="_CaseStatus";
    /**
     * 会议状态字段
     */
    public static final BigDecimal CASE_STATUS_WAITSTART=new BigDecimal(0);  //启动会议
    public static final BigDecimal CASE_STATUS_START=new BigDecimal(1);  //启动会议
    public static final BigDecimal CASE_STATUS_PAUSE=new BigDecimal(4);	 //休庭
    public static final BigDecimal CASE_STATUS_STOP=new BigDecimal(2);	 //结束会议
    public static final BigDecimal CASE_STATUS_DELETE=new BigDecimal(5);	 //结束会议
    /**
     * 角色
     */
    public static final String ADMIN_ROLE="role_01";
    public static final String SERVICE_ROLE="role_02";
    public static final String CLERT_ROLE="role_03";
    /**
     * 语音播报截取字符串长度
     */
    public static final int CUTCONTENTLENGTH=500;
    /**
     * 系统参数后缀
     */
    public static final String _PARAMS="_SystemParam";
    
    public static final Map<String,String> PARAM_MAP = Maps.newHashMapWithExpectedSize(50);
    static{
    	PARAM_MAP.put("BROADCAST_DEV_KEY","broadcast_dev_key");
    	PARAM_MAP.put("BROADCAST_PORT","broadcast_port");
    	PARAM_MAP.put("BROADCAST_X_APP_KEY","broadcast_x_app_key");
    	PARAM_MAP.put("BROADCAST_X_EID","broadcast_x_eid");
    	PARAM_MAP.put("BROADCAST_X_SDK_VERSION","broadcast_x_sdk_version");
    	PARAM_MAP.put("BROADCAST_X_TID","broadcast_x_tid");
    	PARAM_MAP.put("BROADCAST_X_UDID","broadcast_x_udid");
    	PARAM_MAP.put("COURT_NAME","court_name");
    	PARAM_MAP.put("JEDIS_MAX_ACTIVE","jedis_max_active");
    	PARAM_MAP.put("JEDIS_MAX_IDE","jedis_max_ide");
    	PARAM_MAP.put("JEDIS_MAX_WAIT","jedis_max_wait");
    	PARAM_MAP.put("JEDIS_PASSWORD","jedis_password");
    	PARAM_MAP.put("JEDIS_PORT","jedis_port");
    	PARAM_MAP.put("JEDIS_TEST_ON_BORROW","jedis_test_on_borrow");
    	PARAM_MAP.put("JEDIS_TEST_ON_RETURN","jedis_test_on_return");
    	PARAM_MAP.put("JEDIS_TIMEOUT","jedis_timeout");
    	PARAM_MAP.put("JEDIS_URL","jedis_url");
    	PARAM_MAP.put("LIVE_URL","live_url");
    	PARAM_MAP.put("NETWORK_NAME","network_name");
    	PARAM_MAP.put("NETWORK_SPEED","network_speed");
    	PARAM_MAP.put("RESET_PASSWORD_VALUE","reset_password_value");
//    	PARAM_MAP.put("SSH_PCM_TO_MP3_IP","ssh_pcm_to_mp3_ip");
//    	PARAM_MAP.put("SSH_PCM_TO_MP3_PASS","ssh_pcm_to_mp3_pass");
    	PARAM_MAP.put("SSH_PCM_TO_MP3_SHELL","ssh_pcm_to_mp3_shell");
//    	PARAM_MAP.put("SSH_PCM_TO_MP3_USER","ssh_pcm_to_mp3_user");
    	PARAM_MAP.put("SSH_RESTART_ASR_IP","ssh_restart_asr_ip");
    	PARAM_MAP.put("SSH_RESTART_ASR_PASS","ssh_restart_asr_pass");
    	PARAM_MAP.put("SSH_RESTART_ASR_SHELL","ssh_restart_asr_shell");
    	PARAM_MAP.put("SSH_RESTART_ASR_USER","ssh_restart_asr_user");
    	PARAM_MAP.put("SSH_RESTART_TTS_IP","ssh_restart_tts_ip");
    	PARAM_MAP.put("SSH_RESTART_TTS_PASS","ssh_restart_tts_pass");
    	PARAM_MAP.put("SSH_RESTART_TTS_SHELL","ssh_restart_tts_shell");
    	PARAM_MAP.put("SSH_RESTART_TTS_USER","ssh_restart_tts_user");
//    	PARAM_MAP.put("SSH_MAJOR_IP","ssh_major_ip");
//    	PARAM_MAP.put("SSH_MAJOR_PASS","ssh_major_pass");
    	PARAM_MAP.put("SSH_MAJOR_SHELL","ssh_major_shell");
    	PARAM_MAP.put("SSH_MAJOR_STSTUS_FILE","ssh_major_ststus_file");
//    	PARAM_MAP.put("SSH_MAJOR_USER","ssh_major_user");
    	PARAM_MAP.put("SSH_MAJOR_FILE","ssh_major_file");
    	PARAM_MAP.put("THREAD_POOL_KEEPALIVE","thread_pool_keepAlive");
    	PARAM_MAP.put("THREAD_POOL_MAXSIZE","thread_pool_maxSize");
    	PARAM_MAP.put("THREAD_POOL_MINSIZE","thread_pool_minSize");
    	PARAM_MAP.put("PCM_PATH","pcm_path");
    	PARAM_MAP.put("PCM_MP3_IP","pcm_mp3_ip");
    	PARAM_MAP.put("PCM_MP3_USER","pcm_mp3_user");
    	PARAM_MAP.put("PCM_MP3_PASS","pcm_mp3_pass");
    	PARAM_MAP.put("SSH_REBOOT_IP","ssh_reboot_ip");
    	PARAM_MAP.put("SSH_REBOOT_PASS","ssh_reboot_pass");
    	PARAM_MAP.put("SSH_REBOOT_SHELL","ssh_reboot_shell");
    	PARAM_MAP.put("SSH_REBOOT_USER","ssh_reboot_user");
    	PARAM_MAP.put("JTTS_IP","jtts_ip");
    	PARAM_MAP.put("JTTS_PORT","jtts_port");
    	PARAM_MAP.put("RESTARTASR_TODAY","ReStartAsr_Today");
    }
}
